﻿<%@ Page Language="C#" MasterPageFile="~/User.Master" AutoEventWireup="true" CodeBehind="CourseManage.aspx.cs" Inherits="ScoreManage.User" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width:100%">
    <tr>
      <td style="font-family:黑体; font-size:26px; height:30px; text-align:center;">
        课程管理
      </td>
    </tr>
    <tr>
      <td>
        <asp:Button ID="btnInsert" runat="server" Text="添加" onclick="btnInsert_Click" />
          <br />
          <asp:TextBox ID="txtQuery" runat="server" Width="138px" ></asp:TextBox>
          <asp:Button ID="btnCno" runat="server" Text="按课程号查询" onclick="btnCno_Click" />
          <asp:Button ID="btnCname" runat="server" Text="按课程名称查询" onclick="btnCname_Click" />
          <asp:Button ID="btnTname" runat="server" Text="按教师姓名查询" onclick="btnTname_Click" />
          <br/>
      </td>
    </tr>
    <tr>
      <td>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="800px" CellPadding="4" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
          <Columns>
            <asp:BoundField DataField="cno" HeaderText="课程号" ReadOnly="True">
              <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="cname" HeaderText="课程名" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="lecture" HeaderText="学时" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="semester" HeaderText="学期" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="credit" HeaderText="学分" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="tno" HeaderText="授课教师职工号" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:BoundField DataField="tname" HeaderText="授课教师姓名" >
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:TemplateField ShowHeader="False">
              <ItemTemplate>
                <asp:HyperLink ID="hlinkEdit" runat="server"
                  NavigateUrl='<%# Eval("Cno", "CourseEdit.aspx?Cno={0}") %>'>编辑</asp:HyperLink>
                <asp:LinkButton ID="lbtnDelete" runat="server" 
                  CommandArgument='<%# string.Format("{0},{1}",Eval("cno") ,Eval("tno"))%>' onclick="lbtnDelete_Click">删除</asp:LinkButton>
              </ItemTemplate>
            </asp:TemplateField>
          </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
      </td>
    </tr>
  </table>
</asp:Content>
